package com.wei.tang.db;

/**
 * 数据库结构信息类
 * 
 * @author jamie
 */
public class DBInfo {

	public static class DB {
		/**
		 * 数据库名称和版本
		 */
		public static final String DB_NAME = "weiketang.db";
		public static final int VERSION = 1;
	}

	/**
	 * 用户表
	 * 
	 * @author wujamie
	 */
	public static class UserTable {
		/**
		 * 用户信息表
		 */
		public static final String USER_TABLE = "userinfo";
		/**
		 * 用户账号
		 */
		public static final String USER_ID = "user_id";
		/**
		 * 用户密码
		 */
		public static final String USER_PASSWORD = "user_password";
		/**
		 * 用户手机
		 */
		public static final String USER_PHONE = "user_phone";
		/**
		 * 用户名称
		 */
		public static final String USER_NAME = "user_name";
		/**
		 * 用户性别
		 */
		public static final String USER_SEX = "user_sex";
		/**
		 * 用户session
		 */
		public static final String USER_SESSION = "user_session";
		/**
		 * 用户身份
		 */
		public static final String USER_STATUS = "user_status";
		/**
		 * 用户头像
		 */
		public static final String USER_HEAD = "user_head";
		/**
		 * 用户描述
		 */
		public static final String DECRIPTION = "decription";
		/**
		 * 用户地址
		 */
		public static final String USER_LOCATION = "user_location";
		/**
		 * 登录时间
		 */
		public static final String USER_TIME = "user_time";
		/**
		 * 忘记密码标示
		 */
		public static final String USER_TAG = "user_tag";
		/**
		 * 建用户表
		 */
		public static final String CREATE_USER_TABLE = "create table if not exists  " + USER_TABLE + "(" + USER_ID
				+ " integer primary key ," + USER_PHONE + " text," + USER_PASSWORD + " text," + USER_NAME + " text,"
				+ USER_SEX + " text," + USER_SESSION + " text," + USER_STATUS + " text," + DECRIPTION + " text,"
				+ USER_LOCATION + " text," + USER_TIME + " text," + USER_TAG + " text," + USER_HEAD + " text)";
		/**
		 * 删除用户表空间名
		 */
		public static final String DROP_USER_TABLE = "drop table " + USER_TABLE;
	}

	/**
	 * 课程分类表
	 * 
	 * @author wujamie
	 *
	 */

	public static class ClassifyTable {
		/**
		 * 分类信息表
		 */
		public static final String CLASSIFY_TABLE = "classifyinfo";
		/**
		 * 老师
		 */
		public static final String CLASSIFY_ID = "classify_id";
		/**
		 * 名字
		 */
		public static final String CLASSIFY_NAME = "classify_name";
		/**
		 * 描述
		 */
		public static final String CLASSIFY_DESC = "classify_desc";
		/**
		 * 学生
		 */
		public static final String CLASSIFY_ADDTIME = "classify_addtime";
		/**
		 * 路径
		 */
		public static final String CLASSIFY_ADDUSERID = "classify_adduserid";
		/**
		 * 创建分类信息表
		 */
		public static final String CREATE_CLASSIFY_TABLE = "create table if not exists  " + CLASSIFY_TABLE + "("
				+ CLASSIFY_ID + " integer primary key ," + CLASSIFY_NAME + " text," + CLASSIFY_DESC + " text,"
				+ CLASSIFY_ADDTIME + " text," + CLASSIFY_ADDUSERID + " text)";
		/**
		 * 删除分类信息表
		 */
		public static final String DROP_CLASSIFY_TABLE = "drop table " + CLASSIFY_TABLE;
	}

	/**
	 * 文章信息表
	 * 
	 * @author wujamie
	 */
	public static class ArticleTable {
		/**
		 * 文章信息表名
		 */
		public static final String ARTICLE_TABLE = "articleinfo";
		/**
		 * 文章ID
		 */
		public static final String ARTICLE_ID = "article_id";
		/**
		 * 文章name
		 */
		public static final String ARTICLE_NAME = "article_name";
		/**
		 * 文章分类
		 */
		public static final String ARTICLE_CLASSIFYID = "article_classifyid";
		/**
		 * 文章描述
		 */
		public static final String ARTICLE_DESC = "article_desc";
		/**
		 * 文章内容
		 */
		public static final String ARTICLE_CONTENT = "article_content";
		/**
		 * 发表时间
		 */
		public static final String ARTICLE_TIME = "article_time";
		/**
		 * 发表用户ID
		 */
		public static final String ARTICLE_USERID = "article_userid";
		/**
		 * 发表用户名
		 */
		public static final String ARTICLE_USERNAME = "article_username";
		/**
		 * 文章阅读次数
		 */
		public static final String ARTICLE_READTIMES = "article_readtimes";
		/**
		 * 文章评论次数
		 */
		public static final String ARTICLE_COMMENTTIMES = "article_commenttimes";
		/**
		 * 文章点赞次数
		 */
		public static final String ARTICLE_PRAISETIMES = "article_praisetimes";
		/**
		 * 创建文章信息表
		 */
		public static final String CREATE_ARTICLE_TABLE = "create table if not exists  " + ARTICLE_TABLE + "("
				+ ARTICLE_ID + " integer primary key ," + ARTICLE_NAME + " text," + ARTICLE_CLASSIFYID + " text,"
				+ ARTICLE_DESC + " text," + ARTICLE_CONTENT + " text," + ARTICLE_TIME + " text," + ARTICLE_USERID
				+ " text," + ARTICLE_USERNAME + " text," + ARTICLE_READTIMES + " text," + ARTICLE_COMMENTTIMES
				+ " text," + ARTICLE_PRAISETIMES + " text)";
		/**
		 * 删除文章信息表
		 */
		public static final String DROP_ARTICLE_TABLE = "drop table " + ARTICLE_TABLE;
	}

	/**
	 * 视频课的表结构类
	 * 
	 * @author wujamie
	 *
	 */
	public static class CourseTable {
		/**
		 * 课程表名
		 */
		public static final String COURSE_TABLE = "courseinfo";
		/**
		 * 课程ID
		 */
		public static final String COURSE_ID = "course_id";
		/**
		 * 课程名字
		 */
		public static final String COURSE_NAME = "course_name";
		/**
		 * 课程地址
		 */
		public static final String COURSE_URL = "course_url";
		/**
		 * 课程上传时间
		 */
		public static final String COURSE_LOADTIME = "course_loadtime";
		/**
		 * 课程作者ID
		 */
		public static final String COURSE_USERID = "course_userid";
		/**
		 * 课程作者NAME
		 */
		public static final String COURSE_USERNAME = "course_username";
		/**
		 * 课程分类ID
		 */
		public static final String COURSE_CLASSIFYID = "course_classifyid";
		/**
		 * 课程大小
		 */
		public static final String COURSE_SIZE = "course_size";
		/**
		 * 课程时长
		 */
		public static final String COURSE_TIME = "course_time";
		/**
		 * 播放次数
		 */
		public static final String COURSE_PLAYTIMES = "course_playtimes";
		/**
		 * 评论次数
		 */
		public static final String COURSE_COMMENTTIMES = "course_commenttimes";
		/**
		 * 点赞次数
		 */
		public static final String COURSE_PRAISETIMES = "course_praisetimes";
		/**
		 * 创建课程信息表
		 */
		public static final String CREATE_COURSE_TABLE = "create table if not exists  " + COURSE_TABLE + "(" + COURSE_ID
				+ " integer primary key ," + COURSE_NAME + " text," + COURSE_URL + " text," + COURSE_LOADTIME + " text,"
				+ COURSE_USERID + " text," + COURSE_USERNAME + " text," + COURSE_CLASSIFYID + " text," + COURSE_SIZE
				+ " text," + COURSE_TIME + " text," + COURSE_PLAYTIMES + " text," + COURSE_COMMENTTIMES + " text,"
				+ COURSE_PRAISETIMES + " text)";
		/**
		 * 删除课程信息表
		 */
		public static final String DROP_COURSE_TABLE = "drop table " + COURSE_TABLE;
	}

	/**
	 * 评论详细表
	 * 
	 * @author wujamie
	 */
	public static class CommentTable {
		/**
		 * 评论详细表名
		 */
		public static final String COMMENT_TABLE = "commentinfo";
		/**
		 * 评论ID
		 */
		public static final String COMMENT_ID = "comment_id";
		/**
		 * 评论内容
		 */
		public static final String COMMENT_CONTENT = "comment_content";
		/**
		 * 评论发布时间
		 */
		public static final String COMMENT_TIME = "comment_time";
		/**
		 * 发布评论的用户
		 */
		public static final String COMMENT_USERID = "comment_userid";
		/**
		 * 评论是否删除
		 */
		public static final String COMMENT_ISDELETE = "comment_isdelete";
		/**
		 * 是否恢复的某条评论，那条评论的id
		 */
		public static final String COMMENT_REPLYID = "comment_replayid";
		/**
		 * 被评论次数
		 */
		public static final String COMMENT_COMMENTTIMES = "comment_commenttimes";
		/**
		 * 被点赞次数
		 */
		public static final String COMMENT_PARISETIMES = "comment_praisetimes";
		/**
		 * 创建评论信息表
		 */
		public static final String CREATE_COMMENT_TABLE = "create table if not exists  " + COMMENT_TABLE + "("
				+ COMMENT_ID + " integer primary key ," + COMMENT_CONTENT + " text," + COMMENT_TIME + " text,"
				+ COMMENT_USERID + " text," + COMMENT_ISDELETE + " text," + COMMENT_REPLYID + " text,"
				+ COMMENT_COMMENTTIMES + " text," + COMMENT_PARISETIMES + " text)";
		/**
		 * 删除评论信息表
		 */
		public static final String DROP_COMMENT_TABLE = "drop table " + COMMENT_TABLE;
	}

	public static class DynamicTable {
		public static final String WEIBA_TABLE = "weibainfo";
		public static final String WEIBA_ID = "weiba_id";
		public static final String WEIBA_CID = "cid";
		public static final String WEIBA_NAME = "weiba_name";
		public static final String WEIBA_UID = "uid";
		public static final String WEIBA_CTIME = "ctime";
		// 发微博的用户的名字
		public static final String WEIBA_LOGO = "logo";
		// 发微博的用户头像
		public static final String WEIBA_INTRO = "intro";
		// 微博是否删除
		public static final String WEIBA_CANPOST = "can_post";
		// 微博来自
		public static final String WEIBA_CANREPLY = "can_reply";
		// 微博评论次数
		public static final String WEIBA_FOLLOWER_COUNT = "follower_count";
		// 是否被转发
		public static final String WEIBA_THREAD_COUNT = "tread_count";
		// 是否被转发
		public static final String WEIBA_ADMIN_UID = "admin_uid";
		// 总的评论次数
		public static final String WEIBA_RECOMMEND = "recommend";
		// 赞的次数
		public static final String WEIBA_STATUS = "status";
		// 是否被转发
		public static final String WEIBA_ISDEL = "is_del";
		// 是哪里包含的
		public static final String WEIBA_NOTIFY = "notify";
		// 发微博的类型
		public static final String WEIBA_LOGOURL = "logo_url";
		// 是否是图片微博
		public static final String WEIBA_FOLLOWSTATE = "followstate";
		// 发微博的用户头像
		public static final String WEIBO_UHEAD = "user_head";
		// 微博是否删除
		public static final String WEIBO_ISDEL = "weibo_isdel";
		// 微博来自
		public static final String WEIBO_FROM = "weibo_from";
		// 微博评论次数
		public static final String WEIBO_COMMENT = "weibo_comment_count";
		// 是否被转发
		public static final String WEIBO_REPOST = "weibo_repost_count";
		// 总的评论次数
		public static final String WEIBO_ALLCOMMENT = "weibo_comment_all_count";
		// 赞的次数
		public static final String WEIBO_DIGG = "weibo_digg_count";
		// 是否被转发
		public static final String WEIBO_ISREPOST = "weibo_is_repost";
		// 是哪里包含的
		public static final String WEIBO_APP = "weibo_app";
		// 发微博的类型
		public static final String WEIBO_TYPE = "weibo_type";
		// 是否是图片微博
		public static final String WEIBO_ISPIC = "weibo_ispic";
		// 是否已经收藏
		public static final String WEIBO_ISCOLL = "weibo_iscoll";
		// 是否已经赞
		public static final String WEIBO_ISDIGG = "weibo_isdigg";

		public static final String CREATE_DYNAMIC_TABLE = "create table if not exists  " + WEIBA_TABLE + "(" + WEIBA_ID
				+ " integer primary key ," + WEIBA_CID + " text," + WEIBA_NAME + " text," + WEIBA_UID + " text,"
				+ WEIBA_CTIME + " text," + WEIBA_LOGO + " text," + WEIBA_INTRO + " text," + WEIBA_CANPOST + " text,"
				+ WEIBA_CANREPLY + " text," + WEIBA_FOLLOWER_COUNT + " text," + WEIBA_THREAD_COUNT + " text,"
				+ WEIBA_ADMIN_UID + " text," + WEIBA_RECOMMEND + " text," + WEIBA_STATUS + " text," + WEIBA_ISDEL
				+ " text," + WEIBA_NOTIFY + " text," + WEIBA_LOGOURL + " text," + WEIBA_FOLLOWSTATE + " text)";
		// 删除用户表空间名
		public static final String DROP_DYNAMIC_TABLE = "drop table " + WEIBA_TABLE;
	}
}
